-
-
Notifications
You must be signed in to change notification settings - Fork 782
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect iMX RT variant to support more than 1060 #1599
Conversation
Please update your commit message to conform to the contribution guidelines and split the SPI and SFDP changes out into their own commits. They are not directly related to the i.MXRT support improvements and so don't belong in the same commit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution! This is an initial review and complements the items given in the lint pass from CI. This is looking good, but could do with a little more work before we can merge it.
73331d9
to
2ca5952
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for splitting the contribution into commits. We have now given the code a more proper review, see below. It looks like a lot of items, for which apologies, but most of them should be fairly trivial to address and are quite mechanical in nature.
We look forward to testing this on our i.MXRT1060 board and getting this merged soon!
There's a small additional change we'd like to request based on some research @mubes has been doing - it turns out that allowing the Cortex-M probe routine to poke for Kinetis parts before iMXRT parts puts certain iMXRT parts in a bad state when we arrive, so please apply this patch in a new commit as part of this PR: diff --git a/src/target/cortexm.c b/src/target/cortexm.c
index 6d80f4f8..28bdc5d9 100644
--- a/src/target/cortexm.c
+++ b/src/target/cortexm.c
@@ -686,8 +686,8 @@ bool cortexm_probe(adiv5_access_port_s *ap)
switch (t->designer_code) {
case JEP106_MANUFACTURER_FREESCALE:
- PROBE(kinetis_probe);
PROBE(imxrt_probe);
+ PROBE(kinetis_probe);
break;
case JEP106_MANUFACTURER_GIGADEVICE:
PROBE(gd32f1_probe); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are only two items we saw doing a further review. With these taken care of we think this is ready to be merged. Please rebase this on main (git rebase -i main
), which will eliminate that merge commit, and then squish fixes such as the spi.c print removal into the original commit for that - we are happy to provide help with this if you would like.
Thank you for your hard work with this and persevering!
Please feel free to finish this. I've lost the context for it (not working with imx currently.) |
Thank you - we'll get on that in the next day or two then. |
86616a0
to
cc4d5f6
Compare
We have now touched the files, needs Esden's review.
cc4d5f6
to
53b7dd2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Detailed description
This uses a word of the ROM to distinguish different chips. Once distinguished, we can use the correct FLEXSPI base address. Specifically, the 1011 has the FLEXSPI at a different address. Tested on the 1011, 1015, 1020, 1040, 1050 and 1060 EVK boards.
This change also checks the length of the SFDP basic parameters table to ensure it is long enough to include page size. The 1011 and 1015 EVKs use the AT25SF128A which has an old SFDP table that is only 9 DWORDS long. Page size is in DWORD 11.
The 1176 is detected but the flash SFDP doesn't work still. So, it doesn't fully work.
Your checklist for this pull request
make PROBE_HOST=native
)make PROBE_HOST=hosted
)